package seo.dale.swagger.movie.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/movie")
public class MovieController {

	@RequestMapping(value = "/{name}", method = RequestMethod.GET)
	public String get(@PathVariable String name, ModelMap model) {
		model.addAttribute("movie", name);
		return "/movie/list";
	}
	
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public String post(@PathVariable String name, ModelMap model) {
		model.addAttribute("movie", "this is default movie");
		return "/movie/list";
	}
	
}
